﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageSERIX.Master" AutoEventWireup="true"
    CodeBehind="IndicadoresAcaoManut.aspx.cs" Inherits="SERIX.IndicadoresAcaoManut"
    Title="Indicadores de Ação" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div align="center">
        <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
            <tr>
                <td width="100%" class="secao_titulo">
                    <span style="color: black">
                        <asp:Label ID="lblTitulo" runat="server" Text="Indicadores de Ação" TabIndex="-1"></asp:Label>
                        <hr class="linhahorizontal" style="width: 740px" />
                </td>
            </tr>
            <tr>
                <td align="left" class="erro">
                    <asp:Label ID="lblErro" runat="server" CssClass="erro" Text="*Erro: " Visible="False"
                        Width="740px" TabIndex="-1"></asp:Label>
                </td>
            </tr>
        </table>
        <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
            <tr>
                <td align="center" class="grid_mestre">
                    <span style="color: #000000">Programa: </span>
                    <asp:Label ID="lblPrograma" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="center" class="grid_mestre">
                    <span style="color: #000000">Ação: </span>
                    <asp:Label ID="lblAcao" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
        <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
            <tr>
                <td align="left" class="erro">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <table style="width: 100%" __designer:mapid="49">
                        <tr __designer:mapid="50">
                            <td class="grid_titulo_right" style="color: black;" width="25%" __designer:mapid="51">
                                Descrição&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" __designer:mapid="52">
                                <asp:TextBox ID="txtDescricao" runat="server" Columns="44" MaxLength="50"></asp:TextBox>
                                <span style="color: black" __designer:mapid="54" class="grid_celula">
                                    <asp:RequiredFieldValidator ID="rfvDescricao" runat="server" ControlToValidate="txtDescricao"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr __designer:mapid="50">
                            <td class="grid_titulo_right" style="color: black;" width="25%" __designer:mapid="51">
                                Classe&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" __designer:mapid="52">
                                <asp:DropDownList ID="ddlClasses" runat="server" DataSourceID="SqlClassesIndicadores"
                                    DataTextField="DSC_CLA_IND" DataValueField="IDT_CLA_IND" 
                                    onprerender="ddlClasses_PreRender">
                                </asp:DropDownList>
                                <asp:SqlDataSource ID="SqlClassesIndicadores" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                                    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT &quot;IDT_CLA_IND&quot;, &quot;DSC_CLA_IND&quot; FROM &quot;SRX_CLASSES_INDICADORES&quot; ORDER BY &quot;DSC_CLA_IND&quot;">
                                </asp:SqlDataSource>
                                <span style="color: black" __designer:mapid="54" class="grid_celula">
                                    <asp:RequiredFieldValidator ID="rfvClasse" runat="server" ControlToValidate="ddlClasses"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr __designer:mapid="50">
                            <td class="grid_titulo_right" style="color: black;" width="25%" __designer:mapid="51">
                                Valor Máximo&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" __designer:mapid="52">
                                <asp:DropDownList ID="ddlIndicadorLimite" runat="server" 
                                    DataSourceID="SqlIndicadorLimiteDS" DataTextField="DSC_IND" 
                                    DataValueField="IDT_IND" onprerender="ddlIndicadorLimite_PreRender">
                                </asp:DropDownList>
                                <asp:SqlDataSource ID="SqlIndicadorLimiteDS" runat="server" 
                                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                                    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT IDT_IND, DSC_IND FROM SERIX.SRX_INDICADORES_ACOES
WHERE IDT_PROG = :P_IDT_PROG
  AND IDT_ACAO = :P_IDT_ACAO
  AND IDT_IND &lt;&gt; :P_IDT_IND
ORDER BY DSC_IND">
                                    <SelectParameters>
                                        <asp:Parameter Name="P_IDT_PROG" />
                                        <asp:Parameter Name="P_IDT_ACAO" />
                                        <asp:Parameter Name="P_IDT_IND" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
                            </td>
                        </tr>
                        <tr __designer:mapid="50">
                            <td class="grid_titulo_right" style="color: black;" width="25%" __designer:mapid="51">
                                Abreviatura&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" __designer:mapid="52">
                                <asp:TextBox ID="txtRotulo" runat="server" Columns="7" MaxLength="3"></asp:TextBox>
                                <span style="color: black" __designer:mapid="54" class="grid_celula">
                                    <asp:RequiredFieldValidator ID="rfvRotulo" runat="server" ControlToValidate="txtRotulo"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr __designer:mapid="50">
                            <td class="grid_titulo_right" style="color: black;" width="25%" __designer:mapid="51">
                                Tipo&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" __designer:mapid="52">
                                <asp:DropDownList ID="ddlTipos" runat="server">
                                    <asp:ListItem />
                                    <asp:ListItem Value="N" Text="Não Planejado"></asp:ListItem>
                                    <asp:ListItem Value="P" Text="Planejado"></asp:ListItem>
                                    <asp:ListItem Value="M" Text="Somente Meta"></asp:ListItem>
                                </asp:DropDownList>
                                <span style="color: black" __designer:mapid="54" class="grid_celula">
                                    <asp:RequiredFieldValidator ID="rfvTipos" runat="server" ControlToValidate="ddlTipos"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr __designer:mapid="50">
                            <td class="grid_titulo_right" style="color: black;" width="25%" __designer:mapid="51">
                                Totalizador&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" __designer:mapid="52">
                                <asp:DropDownList ID="ddlTotalizadores" runat="server">
                                    <asp:ListItem />
                                    <asp:ListItem Value="S" Text="Soma"></asp:ListItem>
                                    <asp:ListItem Value="M" Text="Média"></asp:ListItem>
                                    <asp:ListItem Value="A" Text="Maior"></asp:ListItem>
                                    <asp:ListItem Value="E" Text="Menor"></asp:ListItem>
                                    <asp:ListItem Value="N" Text="Normal"></asp:ListItem>
                                    <asp:ListItem Value="R" Text="Mais Recente"></asp:ListItem>
                                </asp:DropDownList>
                                <span style="color: black" __designer:mapid="54" class="grid_celula">
                                    <asp:RequiredFieldValidator ID="rfvTotalizador" runat="server" ControlToValidate="ddlTotalizadores"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr __designer:mapid="50">
                            <td class="grid_titulo_right" style="color: black;" width="25%" __designer:mapid="51">
                                Vínculo&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" __designer:mapid="52">
                                <asp:DropDownList ID="ddlVinculos" runat="server">
                                    <asp:ListItem />
                                    <asp:ListItem Value="P" Text="Produtor"></asp:ListItem>
                                    <asp:ListItem Value="O" Text="Organização"></asp:ListItem>
                                </asp:DropDownList>
                                <span style="color: black" __designer:mapid="54" class="grid_celula">
                                    <asp:RequiredFieldValidator ID="rfvVinculo" runat="server" ControlToValidate="ddlVinculos"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr __designer:mapid="50">
                            <td class="grid_titulo_right" style="color: black;" width="25%" __designer:mapid="51">
                                Associação&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td class="grid_celula" style="height: 30px" __designer:mapid="52">
                                <asp:DropDownList ID="ddlDescVinculo" runat="server">
                                    <asp:ListItem />
                                    <asp:ListItem Value="B" Text="Bem de Consumo"></asp:ListItem>
                                    <asp:ListItem Value="C" Text="Cultura"></asp:ListItem>
                                    <asp:ListItem Value="E" Text="Espécie Animal"></asp:ListItem>
                                    <asp:ListItem Value="S">Sem Associação</asp:ListItem>
                                </asp:DropDownList>
                                <span style="color: black" __designer:mapid="54" class="grid_celula">
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlDescVinculo"
                                        CssClass="erro" ErrorMessage="*Campo obrigatório!" Style="position: static" TabIndex="-1"
                                        Width="174px"></asp:RequiredFieldValidator>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" class="erro">
                                &nbsp;
                            </td>
                        </tr>
                        <tr __designer:mapid="56">
                            <td colspan="2" style="height: 30px; color: black;" width="25%" __designer:mapid="57"
                                align="center">
                                <asp:Button ID="Ok_Button" runat="server" Font-Bold="True" Text="Ok" Width="80px"
                                    OnClick="Ok_Button_Click" />
                                &nbsp;<asp:Button ID="Cancelar_Button" runat="server" Font-Bold="True" OnClick="Cancelar_Button_Click"
                                    Text="Cancelar" Width="80px" CausesValidation="False" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
